package cn.csc.module.product.controller.admin.spu.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;

/**
 * @author: 云隐
 * @Date: 2024/01/11
 **/
@ApiModel("用户APP - 加入企业购 Request VO")
@Data
@ToString(callSuper = true)
public class SpuShopDataReqVO {

    @ApiModelProperty(value = "商品Id", required = true)
    @NotNull(message = "商品ID不能为空")
    private BigInteger id;

    @ApiModelProperty(value = "企业购售价", required = true)
    @Digits(integer = 9, fraction=2, message = "企业购售价,格式不正确")
    @DecimalMin(value = "0.01", message = "企业购售价,格式不正确")
    @NotNull(message = "企业购售价不能为空")
    private BigDecimal shopPriceFee;

    @ApiModelProperty(value = "企业购市场价")
    @Digits(integer = 9, fraction=2, message = "企业购市场价,格式不正确")
    @DecimalMin(value = "0.01", message = "企业购市场价格式不正确")
    private BigDecimal shopMarketPriceFee;

    @ApiModelProperty(value = "企业购规格", required = true)
    @Valid
    @NotEmpty(message = "规格不能为空")
    @Size(max = 20,message = "超过数量限制,最多不超过20条")
    private List<SkuAttrCreateReqV2VO> skuAttr;
}
